package com.sys.platform.common.web.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Id;
import javax.persistence.OrderBy;
import java.io.Serializable;
import java.util.Date;

/**
 * Entity基类
 *
 * @author
 */
@Data
@JsonIgnoreProperties({"createBy","updateBy"})
public class DataBaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @ApiModelProperty("主键id")
    private Long id;

    @ApiModelProperty("创建者")
    private String createBy;

    /**
     * 创建时间
     */
    @OrderBy("desc")
    @ApiModelProperty("创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 更新者
     */
    @ApiModelProperty("更新者")
    private String updateBy;

    /**
     * 更新时间
     */
    @ApiModelProperty("更新时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 扩展1
     */
    @ApiModelProperty("扩展1")
    private String reserved1;

    /**
     * 扩展2
     */
    @ApiModelProperty("扩展2")
    private String reserved2;

}
